<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Uploadify Example Script</title>
<link href="__PUBLIC__/example/css/default.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/example/css/uploadify.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/example/scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/example/scripts/swfobject.js"></script>
<script type="text/javascript" src="__PUBLIC__/example/scripts/jquery.uploadify.v2.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	$("#uploadify").uploadify({
		'uploader'       : '__PUBLIC__/example/scripts/uploadify.swf',
		'script'         : '__PUBLIC__/example/scripts/uploadify.php',
		'cancelImg'      : '__PUBLIC__/example/cancel.png',
		'folder'         : '__PUBLIC__/example/uploads/{$project}',
		'queueID'        : 'fileQueue',
		'auto'           : false,
		'multi'          : true,
		'onComplete'     : function(event,queueID,fileObj,response,data)
		{
			var name=fileObj.name;
			var propath=fileObj.filePath;
			var prepath="C:/wamp/www";
			var path=prepath+propath;
			var html='<p><a>'+name+'&nbsp &nbsp &nbsp</a><a href="__PUBLIC__/php/down.php?name='+name+'">下载</a>';
			var htmlf=html+'<a>&nbsp &nbsp &nbsp</a><a href="__PUBLIC__/php/delete.php?name='+name+'">删除</a></p>'
			$('#a').prepend(htmlf);
		}
	});
});
</script>
</head>

<body>
<div id="fileQueue"></div>
<input type="file" name="uploadify" id="uploadify" />
<p><a href="javascript:jQuery('#uploadify').uploadifyUpload()">Upload</a></p>
<p><a href="javascript:jQuery('#uploadify').uploadifyClearQueue()">Cancel All Uploads</a></p>

<p>项目文件下载</p>
<volist name="list" id="vo">
 <p>
 <a>{$vo.orginalname}&nbsp &nbsp &nbsp</a>
 <a href='__APP__/File/down/name/{$vo.orginalname}'>下载</a>
 <a >&nbsp &nbsp &nbsp</a>
 <a href="__PUBLIC__/php/delete.php?name={$vo.orginalname}">删除</a>
 </p>       
</volist>

<div id=a>
</div>

<p><a href="__APP__/File/downall/project/{$project}">项目文件批量下载</a></p>
</body>
</html>